import openai
api_key = "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"
openai.api_key = api_key
import sys
import json
sys.stdout.reconfigure(encoding='utf-8')
def askChatGPT(messages):
    MODEL = "gpt-3.5-turbo"
    response = openai.ChatCompletion.create(
        model=MODEL,
        messages = messages,
        temperature=0)
    print(response['choices'][0]['message']['content'])
    
messages = json.loads(sys.argv[1])
askChatGPT(messages)